<%@ page title="" language="C#" masterpagefile="~/RealtimeSite.master" autoeventwireup="true" inherits="Pro_PHardware, App_Web_xtpq4zcp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">

    pt<style>
        .card [class*=card-header-]:not(.card-header-icon):not(.card-header-text):not(.card-header-image) {
            border-radius: 3px;
            margin-top: -21px;
            padding: 7px;
            padding-left: 10px;
        }

        .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
            padding: 4px 8px;
            vertical-align: middle;
            border-color: #ddd;
        }

        .container {
            max-width: 1215px !important;
            margin-left: 142px;
            margin-top: -76px;
        }

        .table > tbody > tr > th {
            color: #fff !important;
            background: #fb3406ba !important;
            border: 0px !important;
        }

        .panel-heading {
            padding: 6px !important;
            font-size: 13px;
        }

        .panel {
            background: #eee !important;
        }

        #MainContent_lblDepartmentName {
            font-size: 14px;
            font-weight: 600;
        }

        #Span1 {
            font-size: 14px;
            font-weight: 600;
        }

        #Span2 {
            font-size: 14px;
            font-weight: 600;
        }

        #Span3 {
            font-size: 14px;
            font-weight: 600;
        }

        .panel-heading {
            background: #fb3406ba !important;
        }

        .btn {
            font-size: 11px !important;
        }

        #MainContent_Label8 {
            font-weight: bold;
            font-size: 14px;
        }

        .btn-success.disabled, .btn-success.disabled.active, .btn-success.disabled.focus, .btn-success.disabled:active, .btn-success.disabled:focus, .btn-success.disabled:hover, .btn-success[disabled], .btn-success[disabled].active, .btn-success[disabled].focus, .btn-success[disabled]:active, .btn-success[disabled]:focus, .btn-success[disabled]:hover, fieldset[disabled] .btn-success, fieldset[disabled] .btn-success.active, fieldset[disabled] .btn-success.focus, fieldset[disabled] .btn-success:active, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success:hover {
            color: #fff;
            background-color: #66bb6a;
            border-color: #66bb6a;
        }

        .auto-style1 {
            font-weight: bold;
        }
    </style><div class="container" id="usermanger12" runat="server">
        <div class="row dash-pane2">
            <div class="card">
                <div class="card-header card-header-warning" id="cardheadergreen" runat="server">
                    <h4 class="card-title"><i class="fa fa-list fa-fw"></i>
                        <asp:Label ID="Label1" runat="server" Text="User Manager"></asp:Label></h4>
                </div>
                <div class="card-body" overflow="auto">
                    <!---------User Manager----------->
                    <div class="row" >                        
                        <div class=" row col-lg-3" >   
                             <div class="col-md-2" style="max-width: 100%;" >
                         <asp:Label ID="Label9" runat="server" Text="Devices:"></asp:Label>
                                </div>
                             <div class="col-md-2" style="    max-width: 50%; flex: 1 0 16.666667%;" >
                            <asp:DropDownList ID="Device_List" runat="server" class="form-control" OnSelectedIndexChanged="Device_List_SelectedIndexChanged" AutoPostBack="True">
                            </asp:DropDownList> 
                                 </div>                             
                        </div>
                        <div class="row col-lg-3" >
                            <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;" ><asp:Label ID="Label11" runat="server" Text="Serial No:  " style="float:right;"></asp:Label></div>
                            <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;" ><asp:Label ID="LDev_Name" runat="server"></asp:Label></div>
                        </div>
                        <div class="row col-lg-2" >
                            <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.66667%;"><asp:Label ID="Label12" runat="server" Text="Status:"></asp:Label></div>
                            <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;"><asp:Image ID="StatusImg" runat="server" Height="20px" ImageUrl="~/images/redon.png"  Width="20px" /></div>
                        </div>
                        <div class="row col-lg-4" > 
                             <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;"><asp:Button ID="Button10" runat="server" type="button" Text="Connect " class="btn btn-success" OnClick="Button1_Click1" /></div>
                             <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;"><asp:Button ID="Button8" runat="server" type="button" Text="Get User List" class="btn btn-success" OnClick="Button8_Click1" /></div>
                             <div class="col-lg-2" style=" max-width: 100%; flex: 1 0 16.666667%;"><asp:DropDownList ID="DropDownList1" runat="server" Height="32px" Width="80px" AutoPostBack="True" class="form-control" ></asp:DropDownList></div>
                            <asp:Label ID="UpdateTimeTxt" runat="server" Visible="false"></asp:Label>
                            <asp:Label ID="StatusTxt" runat="server" Visible="false"></asp:Label>
                            <asp:Label ID="mTransIdTxt" runat="server" Visible="False"></asp:Label>                           
                        </div>                              
                    </div>

                    <div class="row" style="margin-left: 0px; margin-right: 0px; margin-top: 0px; display: none">
                        <div class="panel panel-primary" style="width: 100%">
                            <div class="panel-heading">
                                <asp:Label ID="lblDeviceInfo" runat="server" Text="Device Info"></asp:Label>
                            </div>
                            <div class="panel-body" style="padding-bottom: 0px !important;">
                                <div class="row" style="padding-top: 0px;">
                                    <div class="col-lg-4">
                                        <asp:Label ID="Label10" runat="server" Text="ID:  "></asp:Label>
                                        <asp:Label ID="LDev_ID" runat="server"></asp:Label>
                                    </div>                                   
                                </div>
                            </div>
                        </div>
                    </div>
                  
                    <div class="col-lg-12">
                       
                        <br /></div>
                    <!-------End User Manager--------->

                    <div class="row">
                        <div class="col-lg-12" style="height: auto;">
                            <div class="panel-heading" style="background-color: #C0C0C0">
                                <strong class="auto-style1"><span class="auto-style1">Result Message :</span></strong>
                                <asp:Label ID="Label16" runat="server" Font-Bold="True"></asp:Label>
                            </div>
                            <div >
                                <br /> 
                                    <div class="col-lg-2" style="float: left !important; border: solid 0px #ddd; height: 300px;over-flow-x: hidden; overflow-y: auto;">
                                        <div class="panel-heading" style="background-color: #C0C0C0; border-top-left-radius: 0rem; border-top-right-radius: 0rem; top: 0px; left: 0px;">
                                            <strong class="auto-style1"><span class="auto-style1" style="color: white;">View Photo :</span></strong>
                        
                                        </div>
                                      
                                        <asp:Image ID="UserPhoto" runat="server" BorderColor="#666666" BorderWidth="2px" EnableTheming="False" EnableViewState="False" Height="110px" Width="110px" />
                                    <div>
                                        User Type
                                       <%-- <asp:DropDownList ID="DropDownList2" runat="server" Width="110px">
                                            <asp:ListItem>USER</asp:ListItem>
                                            <asp:ListItem>MANAGER</asp:ListItem>
                                            <asp:ListItem>OPERATOR</asp:ListItem>
                                            <asp:ListItem Value="REGISTER">REGISTER</asp:ListItem>
                                        </asp:DropDownList>--%>

                                         <asp:DropDownList ID="UserPriv" runat="server" Width="100px">
                <asp:ListItem>USER</asp:ListItem>
                <asp:ListItem>MANAGER</asp:ListItem>
                <asp:ListItem>OPERATOR</asp:ListItem>
                <asp:ListItem Value="REGISTER">REGISTER</asp:ListItem>
            </asp:DropDownList>


                                    </div>
                                    <div>
                                        ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <asp:TextBox ID="UserID" runat="server" Enabled="False" Width="110px"></asp:TextBox>
                                    </div>
                                    <div>Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :    <asp:TextBox ID="UserName" runat="server" Width="110px" Enabled="False"></asp:TextBox></div>
                                    <div>Pin:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   <asp:TextBox ID="Password" runat="server" Enabled="False" Width="110px"></asp:TextBox></div>
                                    <div>Card No&nbsp;&nbsp; : <asp:TextBox ID="CardNum" runat="server" Enabled="False" Width="110px"></asp:TextBox></div>

                                    <div style="float: left">
                                        
                                        <asp:Button ID="btnshowfromDB" runat="server" Text="Show" Width="130px" type="button" class="btn btn-success " Height="32px" OnClick="btnshowfromDB_Click" />
                                    </div>
                                            </div>
                                
                            </div>
                            <div>
                                <div class="col-lg-7" style="float: left !important; border: solid 0px #ddd;">
                                    <div class="col-lg-4" align="center" style="float: left;">
                                        <asp:TextBox runat="server" ID="inputSearch" ClientIDMode="Static" Height="21px" placeholder="Search Branch/Location" CssClass="form-control" />
                                    </div>
                                    <div class="col-lg-4" align="center" style="float: left;">
                                        <asp:TextBox runat="server" ID="TextBox4" ClientIDMode="Static" Height="21px" placeholder="Search Department" CssClass="form-control" />
                                    </div>
                                    <div class="col-lg-4" align="center" style="float: left;">
                                        <asp:TextBox runat="server" ID="TextBox5" ClientIDMode="Static" Height="21px" placeholder="Employee Biometric Id" CssClass="form-control" />
                                    </div>

                                    <br />
                                    <div style="height: 270px; over-flow-x: hidden; overflow-y: auto; margin-left: 0px; margin-right: 0px; margin-top: 10px">
                                        <asp:GridView ID="Grid1" runat="server" class="table table-bordered table-hover table-striped" Style="font-family: Verdana; font-size: 9pt" AutoGenerateColumns="False" DataKeyNames="Id" AutoOverflow="True">
                                            <Columns>
                                                <asp:TemplateField HeaderText="Select">
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="cbRows" runat="server" Checked="true" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="user_id" HeaderText="EnrollNumber" SortExpression="Address"></asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                    <div style="padding: 0px;">
                                        <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" Checked="True" OnCheckedChanged="CheckBox1_CheckedChanged" Text="Select All/Deselect All" />
                                    </div>                              
                            </div>
                                </div>
                            <div class="col-lg-3" style="float: left !important; border: solid 0px #ddd;">
                                <div style="over-flow-x: hidden; overflow-y: auto;">
                                    <asp:GridView ID="Gridstatus" runat="server" AutoGenerateColumns="False" class="table table-bordered table-hover table-striped" DataKeyNames="device_id" Style="font-family: Verdana; font-size: 9pt" Visible="False">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Select">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="CheckBox2" runat="server" Style="text-align: center" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Device ID">
                                                <ItemTemplate>
                                                    <asp:Label ID="deviceid" runat="server" Style="text-align: center" Text='<%# Eval("device_id") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Status">
                                                <ItemTemplate>
                                                    <asp:Label ID="status" runat="server" Text='<%# Eval("connected") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                                <div style="padding: 10px;">
                                    <asp:CheckBox ID="CheckBox3" runat="server" AutoPostBack="True" Checked="false" OnCheckedChanged="CheckBox3_CheckedChanged" Text="Select All/Deselect All" Visible="False" />
                                    <asp:Button ID="Button5" runat="server" Text="Refresh" type="button" class="btn btn-success " OnClick="btnref_Click" Visible="False" />
                                </div>
                            </div>
                        </div>
                    </div>

                    <asp:Panel ID="Panel2" runat="server" Visible="false">
                        <div class="row" style="margin-left: -15px; margin-right: -15px; margin-top: 10px;">
                            <div class="col-lg-8">
                                <div class="panel panel-primary">
                                    <div class="panel-heading">
                                        <asp:Label ID="Label2" runat="server" Text="Upload in Device"></asp:Label>
                                    </div>
                                    <div class="panel-body" style="padding-top: 10px; padding-bottom: 8px">
                                        <div class="row">
                                            <div class="col-lg-2">
                                                <b><span id="MainContent_lblDepartmentName">
                                                    <asp:Label ID="Label3" runat="server" Text="Enrollment  Id"></asp:Label></span></b>
                                                <asp:TextBox ID="txtcardno" runat="server" class="form-control"></asp:TextBox>
                                            </div>

                                            <div class="col-lg-3">
                                                <b>
                                                    <asp:Label ID="Label8" runat="server" Text="Backup Number"></asp:Label></b>
                                                <asp:DropDownList ID="cbobackupno" runat="server" TabIndex="8" class="form-control">
                                                    <asp:ListItem Value="11">Proximity Card</asp:ListItem>
                                                    <asp:ListItem Value="0">Finger No-0</asp:ListItem>
                                                    <asp:ListItem Value="1">Finger No-1</asp:ListItem>
                                                    <asp:ListItem Value="2">Finger No-2</asp:ListItem>
                                                    <asp:ListItem Value="3">Finger No-3</asp:ListItem>
                                                    <asp:ListItem Value="4">Finger No-4</asp:ListItem>
                                                    <asp:ListItem Value="5">Finger No-5</asp:ListItem>
                                                    <asp:ListItem Value="6">Finger No-6</asp:ListItem>
                                                    <asp:ListItem Value="9">Finger No-7</asp:ListItem>
                                                    <asp:ListItem Value="9">Finger No-8</asp:ListItem>
                                                    <asp:ListItem Value="9">Finger No-9</asp:ListItem>
                                                    <asp:ListItem Value="10">Finger No-10</asp:ListItem>
                                                </asp:DropDownList>
                                            </div>


                                            <div class="col-lg-3">
                                                <b><span id="Span1">
                                                    <asp:Label ID="Label4" runat="server" Text="proximity card No"></asp:Label></span></b>
                                                <asp:TextBox ID="txtsmartcardno" runat="server" class="form-control"></asp:TextBox>
                                            </div>
                                            <div class="col-lg-2">
                                                <b><span id="Span2">
                                                    <asp:Label ID="Label5" runat="server" Text="Employee"></asp:Label></span></b>
                                                <asp:TextBox ID="TxtemployeeNAme" runat="server" class="form-control"></asp:TextBox>
                                            </div>
                                            <div class="col-lg-2" style="padding-top: 20px;">
                                                <asp:Button ID="btnsetuser" runat="server" Text="Upload in Device"
                                                    type="button" class="btn btn-success " OnClick="btnsetuser_Click" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-4">
                                <div class="panel panel-primary">
                                    <div class="panel-heading">
                                        <asp:Label ID="Label6" runat="server" Text="Set Time"></asp:Label>
                                    </div>
                                    <div class="panel-body" style="padding-top: 30px; padding-bottom: 8px">
                                        <div class="row">
                                            <div class="col-lg-3" style="padding-top: 8px;">
                                                <span id="Span3">
                                                    <asp:Label ID="Label7" runat="server" Text="Time"></asp:Label></span>
                                            </div>
                                            <div class="col-lg-5">
                                                <asp:TextBox ID="TextBox3" runat="server" class="form-control"
                                                    Font-Bold="True">00:00:00</asp:TextBox>
                                            </div>
                                            <div class="col-lg-2">
                                                <asp:Button ID="btnsettime" runat="server" Text="Set Time"
                                                    type="button" class="btn btn-success " OnClick="btnsettime_Click" />
                                                <asp:TextBox ID="TextBox1" runat="server" class="form-control"
                                                    Visible="False"></asp:TextBox>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>



                        </div>

                    </asp:Panel>


                    <div class="col-lg-12" style="float: left !important; border: solid 0px #ddd; overflow-y: auto; margin-left: 0px; margin-right: 0px; margin-top: 10px">

                        <br />
                        <br />



                        <div class="row">
                            <div class="col-lg-3">

                                <asp:Timer ID="Timer" runat="server" Enabled="false" Interval="1500" OnTick="Timer_Watch">
                                </asp:Timer>

                            </div>
                            <div class="col-lg-9">
                                <div class="row" style="display: none">

                                    <asp:Label ID="Label13" runat="server" Text="ID"></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="Label14" runat="server" Text="Name"></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
                                    &nbsp;&nbsp;&nbsp; Privilige&nbsp;&nbsp;&nbsp;
           


                                    <asp:DropDownList ID="UserList" runat="server"
                                        Width="130px">
                                    </asp:DropDownList>
                                    <br />
                                    <br />
                                    &nbsp;&nbsp;&nbsp;<asp:Label ID="Label15" runat="server" Text="Card"></asp:Label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            
                                    <br />
                                    <br />
                                    &nbsp;&nbsp; Password&nbsp;
           
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox>
                                    &nbsp;&nbsp;&nbsp;
            <br />
                                    <br />
                                    &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="EnableUser" runat="server" Text="Enable" Visible="False" />
                                    &nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="Fp" runat="server" Text="FingerPrint" Checked="True" />
                                    &nbsp;&nbsp;&nbsp;
            <asp:CheckBox ID="Face" runat="server" Text="Face" Enabled="False" />
                                    <br />
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" style="margin-left: auto; margin-right: auto; display: table">
                        <div class="row" style="margin-left: 100px; margin-right: 0px; margin-top: 0px; position: relative; top: -20px;" id="Panel1" runat="server">
                            <ul class="list-inline" style="display: inline-flex">
                                <li>
                                    <asp:Button ID="Button3" runat="server" Text="Clear Log" type="button" class="btn btn-success " OnClick="Button3_Click" Height="32px" />
                                </li>
                                &nbsp;&nbsp;        
            
       <li>
           <asp:Button ID="Button6" runat="server" Text="Delete All User"
               type="button" class="btn btn-success " OnClick="Button6_Click" Height="32px" /></li>
                                &nbsp;&nbsp;

                                 <li>
            <asp:Button ID="Btnuploadname" runat="server" Text="Upload Name"
                type="button" class="btn btn-success "  Height="32px" OnClick="Btnuploadname_Click" /></li>
                                &nbsp;&nbsp;


        <li>
            <asp:Button ID="Button12" runat="server" Text="Set Admin"
                type="button" class="btn btn-success " OnClick="Button12_Click" Height="32px" /></li>
                                &nbsp;&nbsp;
        <li>
            <asp:Button ID="Button4" runat="server" Text="Remove Admin"
                type="button" class="btn btn-success " OnClick="Button4_Click" Height="32px" />
        </li>
                                &nbsp;&nbsp;          
        <li>
            <asp:Button ID="BtnDeleteUser" runat="server" Text="Delete User"
                type="button" class="btn btn-success " OnClick="BtnDeleteUser_Click" Height="32px" />
        </li>
                                &nbsp;&nbsp;        			
       <li>
           <asp:Button ID="Btnadd" runat="server" Text="Download All Users" OnClick="Btnadd_Click" Height="32px"
               type="button" class="btn btn-success " Visible="False" />
       </li>
                                &nbsp;&nbsp;    
                <li>
                    <asp:Button ID="Button9" runat="server" Text="upload Selected Users"
                        type="button" class="btn btn-success " OnClick="Button9_Click1" Height="32px" />
                </li>
                                &nbsp;&nbsp; 
            <li>
                <asp:Button ID="Button2" runat="server" Text="Load DB"
                    type="button" class="btn btn-success " OnClick="Button2_Click" Height="32px" /></li>
                                &nbsp;&nbsp;
        <li>
            <asp:Button ID="Button7" runat="server" Text="Delete From DB"
                type="button" class="btn btn-success " OnClick="Button7_Click" Height="32px" /><i class="fa fa-plus;"></i>
            <i class="fa fa-trash-o;"></i></li>
                                &nbsp;&nbsp;

                                    <li>
            <asp:Button ID="Btndisableuser" runat="server" Text="Disable User"
                type="button" class="btn btn-success "   Height="32px" OnClick="Btndisableuser_Click" /><i class="fa fa-plus;"></i>
            <i class="fa fa-trash-o;"></i></li>
                                &nbsp;&nbsp;

                                 <li>
            <asp:Button ID="btnenableuser" runat="server" Text="Enable User"
                type="button" class="btn btn-success "   Height="32px" OnClick="btnenableuser_Click"   /><i class="fa fa-plus;"></i>
            <i class="fa fa-trash-o;"></i></li>
                                &nbsp;&nbsp;


       <li>
           <asp:Button ID="Button1" runat="server"
               Text="Back" class=" btn btn-danger"
               OnClick="Button1_Click" Height="32px" />

       </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>

